strip first occurence of substring python

26

>>>mystring = "Description: Mary had a little lamb Description: "
>>>print mystring.replace("Description: ","",1)

"Mary had a little lamb Description: "

Comments

Submit
0 Comments